﻿<Window x:Class="LockCrypt.WinChooseWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:lex="http://schemas.root-project.org/xaml/presentation"
    xmlns:autotype="clr-namespace:LockCrypt.AutoType"
    xmlns:l49="clr-namespace:Lime49;assembly=Lime49"
    l49:WindowService.EscapeClosesWindow="True"
    Title="{lex:LocText LockCrypt.Core:Strings:TargetWindow}" Height="150" Width="300"
    SizeToContent="Height" ResizeMode="NoResize" 
    WindowStartupLocation="CenterOwner" FocusManager.FocusedElement="{Binding ElementName=windowChooser}"
    Style="{StaticResource {x:Type Window}}" Icon="pack://application:,,,/Resources/LockCrypt.ico">
    <Grid Margin="6">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" TextWrapping="Wrap" VerticalAlignment="Center" Text="{lex:LocText LockCrypt.Core:Strings:ChooseWindow}"  />
        <autotype:WindowChooser Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="windowChooser" />
        
        <StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right">
            <Button Name="btnOk" MinWidth="70" IsDefault="True" Click="btnOk_Click" Content="{lex:LocText LockCrypt.Core:Strings:AutoType}"/>
            <Button Name="btnCancel" Margin="2,2,0,2" MinWidth="70" IsCancel="True" Content="{lex:LocText LockCrypt.Core:Strings:Cancel}"/>
        </StackPanel>
    </Grid>
</Window>
